﻿@{
    EasyCourse.Model.CommonPageInfo pageInfo = ViewData[CommonViewDataKey.CommonPageInfo] as EasyCourse.Model.CommonPageInfo;
    string CourseId = string.Empty;
    if (pageInfo != null && !string.IsNullOrEmpty(pageInfo.CourseId))
    {
        CourseId = pageInfo.CourseId;
    }
    var newestList = AnnounceInfoManage.Instance.GetNewestList(CourseId, 5);
    var courseInfoList = CourseInfoManage.Instance.GetAll();
    
}
<div class="rBox mb10">
    <div class="rBox-th">
        <h3 class="fl">最新通知</h3>
        @if (!string.IsNullOrEmpty(CourseId))
        {
            <a href="@Url.Action("AnnounceInfoBrowse", "Announce")?CourseId=@CourseId" target="_blank" class="fr orange">更多&gt;&gt;</a>
        }
    </div>
    <div class="rBox-tb">
        <ul class="ulTxtList">
            @foreach (var item in newestList)
            {
                <li><a target="_blank" href="@Url.Action("AnnounceInfoDetail","Announce")?Id=@item.Id"><span class="sTime">@item.CreateTime.ToTimeString()</span>[@(CourseInfoManage.Instance.GetCourseNameById(courseInfoList, item.CourseId))] @item.Title</a></li>
            }
        </ul>
    </div>
</div>
